{template header}


{template sidebar}

<!-- artile begin -->
<div class="article">
{template title}


<!--{if $a == 'index' || $a =='search'}-->

<form class="form-search" action="{$this->url($c, 'search', $this->get())}">
    <table>
        <tr><td class="td1" width="20%">商品编号：</td>
            <td>

                <div class="input-append">
                    <input type="text" name="key" class="span2 search-query" placeholder=""请输入商品编号 />
                    <button type="button" class="btn search">搜索</button>
                </div>
            </td >
        </tr>
    </table>

</form>


<table cellpadding="1" cellspacing="1" width="100%" border="0">



    <tr>
        <th width="5%"><input type="checkbox" class="all" /> </th>
        <th width="20%">商品编号</th>
        <th width="20%">宝贝货号</th>
        <th width="20%">可选颜色</th>
        <th width="20%">可选尺寸</th>
        <th width="25%">当前状态</th>
    </tr>

    <!--{if  $result}-->
    <!--{loop $result $val}-->
    <tr>
        <td><input type="checkbox" name="goodsNo" value="{$val['goodsNo']}" /></td>
        <td>{$val['goodsNo']}</td>
        <td>{$val['materialNo']}</td>
        <td>{$val['color']}</td>
        <td>{$val['size']}</td>
        <td>{$val['goodsStatus']}</td>
    </tr>

    <!--{/loop}-->

    <!--{else}-->
    <tr>

        <td colspan="4">没有数据记录文件！</td>

    </tr>
    <!--{/if}-->


</table>
<div class="btn-group mulSel" width = 100px>
    <a class= "btn btn-small" href="{$this->url($c,'editPrice')}">修改定价</a>
    <a class= "btn btn-small" href="{$this->url($c,'editAttr')}">属性修改</a>
    <a class= "btn btn-small" href="{$this->url($c,'editGoodsName')}">上传原图</a>
    <a class= "btn btn-small" href="{$this->url($c,'editName')}">修改命名</a>
    <a class= "btn btn-small" href="{$this->url($c,'editSize')}">尺寸编辑</a>
    <a class= "btn btn-small" href="{$this->url($c,'editPostPic')}">上传PS图</a>
</div>
<!--{/if}-->


<!--{if  $a == 'editAttr'}-->

<form method="post" action="{$this->url($c, 'saveEditAttr', array('id' => $result['id']) )}">
    <table cellpadding="1" cellspacing="1" width="100%" border="0">
        <tr>
            <th colspan="2" class="td2" style="text-align: center">自然属性</th>
        </tr>
        <tr>
            <td class="td1">请选择模板类型：</td>
            <td class="td2">
                <select name="templateId" onchange="template(this.value)">
                    <option value="1">模板一</option>
                    <option value="2">模板二</option>
                    <option value="3">模板三</option>
                </select>
                <script>
                    function template( v ) {
                        var url = "{$this->url($c,'editAttr',array('goodsNo'=>G('goodsNo')))}";
                        window.location.href = url + "&t=" + v;
                    }
                </script>
            </td>
        </tr>

        <tr>
            <td class="td1">商品编号：</td>
            <td class="td2">
                <input type="text" size="30" name="goodsNo" value="{$a == 'editAttr' ? $result['goodsNo'] : ''} "  readonly=true/>
            </td>
        </tr>
        <tr>
            <td class="td1">可选颜色：</td>
            <td class="td2" colspan="4">
                <!-- <input type="text" name="sort" placeholder="请输入供货商经营品类" value="{$a == 'edit' ? $result['sort'] : ''}" />  -->
                <input type="text" size="30" name="color" value="{$a == 'editAttr' ? $result['color'] : ''} "  readonly=true/>
            </td>
        </tr>
        <tr>
            <td class="td1">可选尺寸：</td>
            <td class="td2" colspan="4">
                <!-- <input type="text" name="sort" placeholder="请输入供货商经营品类" value="{$a == 'edit' ? $result['sort'] : ''}" />  -->
                <input type="text" size="30" name="size" value="{$a == 'editAttr' ? $result['size'] : ''} " readonly=true />
            </td>
        </tr>

        <tr>
            <td class="td1">弹力指数：</td>
            <td class="td2">
                <select name="flexAttr" >
                    <!--{loop $this->flexAttr $k $v}-->
                    <option value="{$k}"  {echo $k == $result['flexAttr'] ? 'selected':''}>{$v}</option>
                    <!--{/loop}-->
                </select>
            </td>
        </tr>
        <tr>
            <td class="td1">厚度指数：</td>
            <td class="td2">
                <select name="thickness" >
                    <!--{loop $this->thickness $k $v}-->
                    <option value="{$k}"  {echo $k == $result['thickness'] ? 'selected':''}>{$v}</option>
                    <!--{/loop}-->
                </select>
            </td>
        </tr>

        <tr>
            <td class="td1">质地指数：</td>
            <td class="td2">
                <select name="texture" >
                    <!--{loop $this->texture $k $v}-->
                    <option value="{$k}"  {echo $k == $result['texture'] ? 'selected':''}>{$v}</option>
                    <!--{/loop}-->
                </select>
            </td>
        </tr>
        <tr>
            <td class="td1">版型：</td>
            <td class="td2">
                <select name="style" >
                    <!--{loop $this->style $k $v}-->
                    <option value="{$k}"  {echo $k == $result['style'] ? 'selected':''}>{$v}</option>
                    <!--{/loop}-->
                </select>
            </td>
        </tr>

        <tr>
            <td class="td1">风格：</td>
            <td class="td2">
                <select name="clothStyle" >
                    <!--{loop $this->clothStyle $k $v}-->
                    <option value="{$k}"  {echo $k == $result['clothStyle'] ? 'selected':''}>{$v}</option>
                    <!--{/loop}-->
                </select>
            </td>
        </tr>
        <tr>
            <td class="td1">图案：</td>
            <td class="td2">
                <select name="picType" >
                    <!--{loop $this->picType $k $v}-->
                    <option value="{$k}"  {echo $k == $result['picType'] ? 'selected':''}>{$v}</option>
                    <!--{/loop}-->
                </select>
            </td>
        </tr>
        <tr>
            <td class="td1">品牌：</td>
            <td class="td2">
                <select name="brandName" >
                    <!--{loop $this->brand $k $v}-->
                    <option value="{$k}"  {echo $k == $result['brandName'] ? 'selected':''}>{$v}</option>
                    <!--{/loop}-->
                </select>
            </td>
        </tr>

        <tr>
            <td class="td1">服装类型：</td>
            <td class="td2">
                <select name="clothType" >
                    <!--{loop $this->clothType $k $v}-->
                    <option value="{$k}"  {echo $k == $result['clothType'] ? 'selected':''}>{$v}</option>
                    <!--{/loop}-->
                </select>
            </td>
        </tr>
        <!--{if G('t', 1) == 1}-->
        <!--{/if}-->
        <tr>
            <td colspan="2" class="td4">
                <a class="btn btn-success green save" href="{$this->url($c)}">保存</a>
            </td>
        </tr>
    </table>
</form>

<!--{/if}-->

<!--{if  $a == 'editClothSize'}-->
<form method="post" action="{$this->url($c, 'saveEditClothSize', array('id' => $result['id']) )}">
<table cellpadding="1" cellspacing="1" width="100%" border="0">
<tr>
    <th colspan="2" class="td2" style="text-align: center">宝贝尺寸表</th>
</tr>
<tr>
    <td class="td1">请选择模板类型：</td>
    <td class="td2" colspan="3">
        <select name="templateId" onchange="template(this.value)">
            <option value="1"  {echo 1 == $result['t'] ? 'selected':''}>T恤</option>
            <option value="2" {echo 2 == $result['t']  ? 'selected':''}>连衣裙</option>
            <option value="3" {echo 3 == $result['t']  ? 'selected':''}>裤子</option>
            <option value="4" {echo 4 == $result['t']  ? 'selected':''}>上衣</option>
            <option value="5" {echo 5 == $result['t']  ? 'selected':''}>半身裙</option>
            <option value="6" {echo 6 == $result['t']  ? 'selected':''}>短裤</option>
        </select>
        <script>
            function template( v ) {
                var url = "{$this->url($c,'editClothSize',array('goodsNo'=>G('goodsNo')))}";
                window.location.href = url + "&t=" + v;
            }
        </script>
    </td>
</tr>

<tr>
    <td class="td1">商品编号：</td>
    <td class="td2" colspan="3">
        <input type="text" size="30" name="goodsNo" value="{$a == 'editClothSize' ? $result['goodsNo'] : ''}"  readonly=true/>
    </td>
</tr>

<!--{if  $res}-->
<!--{loop $res $key $val}-->
<!--{if  $val}-->
<tr>

    <td class="td1" >大小：</td>
    <td class="td2" colspan="3">
        <input type="text" size="30" name="heightLen{$key}" value="{$a == 'editClothSize' ? $val : ''}"  readonly = true/>
    </td>

</tr>

<!--{if G('t', 1) == 1}-->
<tr>
    <td class="td1">肩宽：</td>
    <td class="td2">
        <input type="text" size="30" name="size1{$key}" value="{$a == 'editClothSize' ? $result['size1'] : ''}" />
    </td>
    <td class="td1">领宽：</td>
    <td class="td2">
        <input type="text" size="30" name="size2{$key}" value="{$a == 'editClothSize' ? $result['size2'] : ''}" />
    </td>
</tr>
<tr>
    <td class="td1">衣长：</td>
    <td class="td2">
        <input type="text" size="30" name="size3{$key}" value="{$a == 'editClothSize' ? $result['size3'] : ''}" />
    </td>
    <td class="td1">袖长：</td>
    <td class="td2">
        <input type="text" size="30" name="size4{$key}" value="{$a == 'editClothSize' ? $result['size4'] : ''}" />
    </td>
</tr>
<tr>
    <td class="td1">胸围：</td>
    <td class="td2">
        <input type="text" size="30" name="size5{$key}" value="{$a == 'editClothSize' ? $result['size5'] : ''}" />
    </td>
    <td class="td1">腰围：</td>
    <td class="td2">
        <input type="text" size="30" name="size6{$key}" value="{$a == 'editClothSize' ? $result['size6'] : ''}" />
    </td>
</tr>
<!--{/if}-->
<!--{if G('t', 1) == 2}-->
<tr>
    <td class="td1">肩宽：</td>
    <td class="td2">
        <input type="text" size="30" name="size1{$key}" value="{$a == 'editClothSize' ? $result['size1'] : ''}" />
    </td>
    <td class="td1">胸围：</td>
    <td class="td2">
        <input type="text" size="30" name="size2{$key}" value="{$a == 'editClothSize' ? $result['size2'] : ''}" />
    </td>
</tr>
<tr>
    <td class="td1">衣长：</td>
    <td class="td2">
        <input type="text" size="30" name="size3{$key}" value="{$a == 'editClothSize' ? $result['size3'] : ''}" />
    </td>
    <td class="td1">袖长：</td>
    <td class="td2">
        <input type="text" size="30" name="size4{$key}" value="{$a == 'editClothSize' ? $result['size4'] : ''}" />
    </td>
</tr>
<tr>
    <td class="td1">臀围：</td>
    <td class="td2">
        <input type="text" size="30" name="size5{$key}" value="{$a == 'editClothSize' ? $result['size5'] : ''}" />
    </td>
    <td class="td1">腰围：</td>
    <td class="td2">
        <input type="text" size="30" name="size6{$key}" value="{$a == 'editClothSize' ? $result['size6'] : ''}" />
    </td>
</tr>
<!--{/if}-->
<!--{if G('t', 1) == 3}-->
<tr>
    <td class="td1">腰围：</td>
    <td class="td2">
        <input type="text" size="30" name="size1{$key}" value="{$a == 'editClothSize' ? $result['size1'] : ''}" />
    </td>
    <td class="td1">臀围：</td>
    <td class="td2">
        <input type="text" size="30" name="size2{$key}" value="{$a == 'editClothSize' ? $result['size2'] : ''}" />
    </td>
</tr>
<tr>
    <td class="td1">腿围：</td>
    <td class="td2">
        <input type="text" size="30" name="size3{$key}" value="{$a == 'editClothSize' ? $result['size3'] : ''}" />
    </td>
    <td class="td1">脚围：</td>
    <td class="td2">
        <input type="text" size="30" name="size4{$key}" value="{$a == 'editClothSize' ? $result['size4'] : ''}" />
    </td>
</tr>
<tr>
    <td class="td1">裤长：</td>
    <td class="td2">
        <input type="text" size="30" name="size5{$key}" value="{$a == 'editClothSize' ? $result['size5'] : ''}" />
    </td>
    <td class="td1">前档：</td>
    <td class="td2">
        <input type="text" size="30" name="size6{$key}" value="{$a == 'editClothSize' ? $result['size6'] : ''}" />
    </td>
</tr>
<!--{/if}-->
<!--{if G('t', 1) == 4}-->
<tr>
    <td class="td1">肩宽：</td>
    <td class="td2">
        <input type="text" size="30" name="size1{$key}" value="{$a == 'editClothSize' ? $result['size1'] : ''}" />
    </td>
    <td class="td1">胸围：</td>
    <td class="td2">
        <input type="text" size="30" name="size2{$key}" value="{$a == 'editClothSize' ? $result['size2'] : ''}" />
    </td>
</tr>
<tr>
    <td class="td1">衣长：</td>
    <td class="td2">
        <input type="text" size="30" name="size3{$key}" value="{$a == 'editClothSize' ? $result['size3'] : ''}" />
    </td>
    <td class="td1">袖长：</td>
    <td class="td2">
        <input type="text" size="30" name="size4{$key}" value="{$a == 'editClothSize' ? $result['size4'] : ''}" />
    </td>
</tr>
<tr>
    <td class="td1">腰围：</td>
    <td class="td2">
        <input type="text" size="30" name="size5{$key}" value="{$a == 'editClothSize' ? $result['size5'] : ''}" />
    </td>
</tr>
<!--{/if}-->
<!--{if G('t', 1) == 5}-->
<tr>
    <td class="td1">腰围：</td>
    <td class="td2">
        <input type="text" size="30" name="size1{$key}" value="{$a == 'editClothSize' ? $result['size1'] : ''}" />
    </td>
    <td class="td1">臀围：</td>
    <td class="td2">
        <input type="text" size="30" name="size2{$key}" value="{$a == 'editClothSize' ? $result['size2'] : ''}" />
    </td>
</tr>
<tr>
    <td class="td1">裙长：</td>
    <td class="td2">
        <input type="text" size="30" name="size3{$key}" value="{$a == 'editClothSize' ? $result['size3'] : ''}" />
    </td>
</tr>
<!--{/if}-->
<!--{if G('t', 1) == 6}-->
<tr>
    <td class="td1">腰围：</td>
    <td class="td2">
        <input type="text" size="30" name="size1{$key}" value="{$a == 'editClothSize' ? $result['size1'] : ''}" />
    </td>
    <td class="td1">臀围：</td>
    <td class="td2">
        <input type="text" size="30" name="size2{$key}" value="{$a == 'editClothSize' ? $result['size2'] : ''}" />
    </td>
</tr>
<tr>
    <td class="td1">腿围：</td>
    <td class="td2">
        <input type="text" size="30" name="size3{$key}" value="{$a == 'editClothSize' ? $result['size3'] : ''}" />
    </td>
    <td class="td1">裤长：</td>
    <td class="td2">
        <input type="text" size="30" name="size4{$key}" value="{$a == 'editClothSize' ? $result['size4'] : ''}" />
    </td>
</tr>
<!--{/if}-->
<!--{/if}-->
<!--{/loop}-->
<!--{/if}-->

<tr>
    <td colspan="2" class="td4">
        <a class="btn btn-success green save" href="{$this->url($c)}">保存</a>
    </td>
</tr>
</table>
</form>

<!--{/if}-->

<!--{if  $a == 'downLoadPics'}-->
<form method="post" action="{$this->url($c, 'saveGoodsName', array('id' => $result['id']) )}">
    <table cellpadding="1" cellspacing="1" width="100%" border="0">
        <tr>
            <th colspan="6" class="td2" style="text-align: center">宝贝名称编辑</th>
        </tr>
        <tr>
            <td class="td1">商品编号：</td>
            <td class="td2">
                <input type="text" size="30" name="goodsNo" value=" {$result['goodsNo']}"  readonly ="true"/>
            </td>
        </tr>
        <tr>
            <td class="td1">文件地址：</td>
            <td class="td2">
                <a href="{$addr}{$fileName}">{$fileName}</a>
            </td>

        </tr>


    </table>
</form>
<!--{/if}-->



<!--{if  $a == 'editGoodsName' }-->
<form method="post" action="{$this->url($c, 'saveGoodsName', array('id' => $result['id']) )}">
    <table cellpadding="1" cellspacing="1" width="100%" border="0">
        <tr>
            <th colspan="6" class="td2" style="text-align: center">宝贝名称编辑</th>
        </tr>
        <tr>
            <td class="td1">商品编号：</td>
            <td class="td2">
                <input type="text" size="30" name="goodsNo" value=" {$result['goodsNo']}"  readonly ="true"/>
            </td>
        </tr>
        <tr>
            <td class="td1">商品属性：</td>
            <td class="td2" colspan="4">
                <!-- <input type="text" name="sort" placeholder="请输入供货商经营品类" value="{$a == 'edit' ? $result['sort'] : ''}" />  -->


                <input type="checkbox"  name="goodsAttr[]" value="1" />图案类型
                <input type="checkbox"  name="goodsAttr[]" value="2" />厚度指数
                <input type="checkbox"  name="goodsAttr[]" value="3" />弹力指数
                <input type="checkbox"  name="goodsAttr[]" value="4" />版型
                <input type="checkbox"  name="goodsAttr[]" value="5" />品牌类型
                <input type="checkbox"  name="goodsAttr[]" value="6"  />服装类型
            </td>
        </tr>
        <tr>
            <td class="td1">促销关键字</td>
            <td class="td2" colspan="4">
                <select name="proKey" >
                    <option value="1">反季促销</option>
                    <option value="2">新店促销</option>
                    <option value="3">清仓促销</option>
                    <option value="4">秋冬新品</option>
                    <option value="5">春夏新装</option>
                    <option value="6">包邮促销</option>
                </select>
            </td>
        </tr>



        <tr>
            <td colspan="2" class="td4">
                <a class="btn btn-success green save" href="{$this->url($c)}">保存</a>
            </td>
        </tr>
    </table>
</form>
<!--{/if}-->


<!--{if  $a == 'editPrice'}-->
<form method="post" action="{$this->url($c, 'saveEditPrice', array('id' => $result['id']) )}">
    <table cellpadding="1" cellspacing="1" width="100%" border="0">
        <tr>
            <th colspan="2" class="td2" style="text-align: center">宝贝定价</th>
        </tr>
        <tr>
            <td class="td1">商品编号：</td>
            <td class="td2">
                <input type="text" name="goodsNo" value="{$result['goodsNo']}"/>
            </td>
        </tr>
        <tr>
            <td class="td1">最低销售价：</td>
            <td class="td2">
                <input type="text" name="lowestPrice" value="{$result['lowestPrice']} "/>
            </td>
        </tr>

        <tr>
            <td class="td1">亲情价：</td>
            <td class="td2">
                <input type="text" name="friendPrice" value="{$result['friendPrice']}  "/>
            </td>
        </tr>

        <tr>
            <td class="td1">促销价：</td>
            <td class="td2">
                <input type="text" name="proSalePrice" value="{$result['proSalePrice']} "/>
            </td>
        </tr>

        <tr>
            <td class="td1">网络销售价：</td>
            <td class="td2">
                <input type="text" name="markPrice" value="{$result['markPrice']}" />
            </td>
        </tr>

        <tr>
            <td colspan="2" class="td4">
                <a class="btn btn-success green save" href="{$this->url($c)}">保存</a>
            </td>
        </tr>
    </table>
</form>
<!--{/if}-->



<!--{if  $a == 'editOrigPic'}-->
<form method="post" enctype="multipart/form-data" action="{$this->url($c, 'saveEditOrigPic', array('id' => $result['id']) )}">
    <table cellpadding="1" cellspacing="1" width="100%" border="0">
        <tr>
            <th colspan="2" class="td2" style="text-align: center">宝贝原图</th>
        </tr>
        <tr>
            <td class="td1">上传说明：</td>
            <td class="td2">
                上传的图片必须满足如下条件：<br/>
                (1)上传的文件类型必须为ZIP格式的压缩文件<br/>
                (2)按照宝贝的编号建立目录，宝贝的图片按编号放在相应目录下。
            </td>
        </tr>
        <tr>
            <td class="td1">商品编号：</td>
            <td class="td2">
                <input type="text" name="goodsNo" value="{$result['goodsNo']} "  readonly ="true"/>
            </td>
        </tr>
        <tr>
            <td class="td1"><label for="file">文件名称:</label></td>
            <td class="td2">
                <input type="file" name="prePicfile" id="file" />
            </td>
        </tr>

        <tr>
            <td colspan="2" class="td4">
                <!-- <a class="btn btn-success green save" href="{$this->url($c)}">保存</a>-->
                <input type="submit" name="submit" value="上传" >
            </td>
        </tr>
    </table>
</form>
<!--{/if}-->

<!--{if  $a == 'editPostPic' }-->
<form method="post" enctype="multipart/form-data" action="{$this->url($c, 'saveEditPostPic', array('id' => $result['id']) )}">
    <table cellpadding="1" cellspacing="1" width="100%" border="0">
        <tr>
            <th colspan="2" class="td2" style="text-align: center">处理后图片</th>
        </tr>
        <tr>
            <td class="td1">上传说明：</td>
            <td class="td2">
                上传的图片必须满足如下条件：<br/>
                (1)上传的文件类型必须为ZIP格式的压缩文件<br/>
                (2)按照宝贝的编号建立目录，宝贝的图片按编号放在相应目录下。
            </td>
        </tr>
        <tr>
            <td class="td1">商品编号：</td>
            <td class="td2">
                <input type="text" name="goodsNo" value="{$result['goodsNo']} " />
            </td>
        </tr>
        <tr>
            <td class="td1"><label for="file">文件名称:</label></td>
            <td class="td2">
                <input type="file" name="postPicfile" id="postPicfile" />
            </td>
        </tr>

        <tr>
            <td colspan="2" class="td4">
                <!-- <a class="btn btn-success green save" href="{$this->url($c)}">保存</a>-->
                <input type="submit" name="submit" value="上传" >
            </td>
        </tr>
    </table>
</form>
<!--{/if}-->












</div>
<!-- artile end -->
{template footer}